Graphics importer components use QuickTime data handler components to obtain their data. Applications, however, will use the graphics importer component functions described in this section, rather than directly calling a data handler. These functions allow the data source to be a file, a handle, or a QuickTime data reference.
You do not need to call the functions in this section if you use one of the GetGraphicsImporter functions. The GetGraphicsImporter functions automatically set the graphics importer component's data source. You only need to use these functions if you open the graphics importer component directly.
Specifies the file that the graphics data resides in.
pascal ComponentResult GraphicsImportSetDataFile (
GraphicsImportComponent ci,
const FSSpec *theFile);
Returns the file that the graphics data resides in.
pascal ComponentResult GraphicsImportGetDataFile (
GraphicsImportComponent ci,
FSSpec *theFile);
Specifies the handle that the graphics data resides in.
pascal ComponentResult GraphicsImportSetDataHandle (
GraphicsImportComponent ci,
Handle h);
Returns the handle that the graphics data resides in.
pascal ComponentResult GraphicsImportGetDataHandle (
GraphicsImportComponent ci,
Handle *h);
Specifies the data reference that the graphics data resides in.
pascal ComponentResult GraphicsImportSetDataReference (
GraphicsImportComponent ci,
Handle dataRef,
OSType dataRefType);
Applications typically do not use this function. The GraphicsImportSetDataFile and GraphicsImportSetDataHandle functions both call this function, with the appropriate data reference and data reference type. This function makes a copy of the passed data reference, so it is safe to dispose of the handle immediately after the call.
Returns the data reference that the graphics data resides in.
pascal ComponentResult GraphicsImportGetDataReference (
GraphicsImportComponent ci,
Handle *dataRef,
OSType *dataRefType);
You use this function to get the data reference that the graphics data resides in. Both the dataRef and dataRefType parameters may be set to nil if the corresponding information is not desired. The GraphicsImportGetDataHandle and GraphicsImportGetDataFile functions call GraphicsImportGetDataReference and then manipulate the result accordingly. The caller should dispose of the returned dataRef .
Specifies the data reference starting offset and data size limit.
pascal ComponentResult GraphicsImportSetDataReferenceOffsetAndLimit (
GraphicsImportComponent ci,
unsigned long offset,
unsigned long limit);
A data reference typically refers to an entire file. However, there are times when the data being referenced is embedded in a larger file. In these cases, it is necessary to indicate where the data begins in the data reference and where it ends. This function lets you specify the starting offset and ending offset. All requests to read data are then relative to the specified offset, and are pinned to the data size, so the graphics import component cannot accidentally read off the end (or beginning) of the segment.
Returns the data reference starting offset and data size limit.
pascal ComponentResult GraphicsImportGetDataReferenceOffsetAndLimit (
GraphicsImportComponent ci,
unsigned long *offset,
unsigned long *limit);
| Previous | Chapter Contents | Chapter Top | Next |